package com.bridge.client.bridgedynamcclient;

import com.bridge.client.bridgedynamcclient.controller.BridgeDynamcController;
import com.bridge.client.bridgedynamcclient.utils.FXMLUtil;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;

import java.io.IOException;

public class BridgeDynamcApplication extends Application {
    @Override
    public void start(Stage stage) throws IOException {
        FXMLLoader fxmlLoader = new FXMLLoader(BridgeDynamcApplication.class.getResource("controller/hello-view.fxml"));
//        FXMLLoader fxmlLoader = FXMLUtil.getLoader(getClass(),"controller/test-view.fxml");

        Scene scene = new Scene(fxmlLoader.load());

        BridgeDynamcController controller= fxmlLoader.getController();
        controller.init(stage);

        stage.setTitle("桥梁动力结构特性");
        stage.getIcons().add(FXMLUtil.getImage("/images/icon_bridge.png"));
        stage.setScene(scene);
        stage.show();
    }

}